home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / graphics / amicad / arexx / simulation.amicad < prev    next >
Text File  |  1999-12-06  |  1KB  |  45 lines

  1. /* Lancement simulation analogique */
  2. /* 8/5/99: version 1.01: ajout guillemets autour du nom du fichier (pour espaces éventuels) */
  3. /* $VER: 1.01 (© R.Florac, 8 mai 1999) */
  4.  
  5. options results     /* indispensable pour récupérer le résultat des macros */
  6.  
  7. signal on error     /* pour l'interception des erreurs */
  8. signal on syntax
  9.  
  10. parse arg fichier
  11. if fichier="" then do
  12.     'REQFILE("Choix d''une netlist", "Spice", "*.cir")'
  13.     fichier=result
  14. end
  15. if fichier~="" then do
  16.     fichier_simulation='"RAM:'||ParseFileName(fichier)||'_spice"'
  17.     address command
  18.     'stack' " 64000"
  19.     'cd' " Travail:spice3f5"
  20.     arguments='"'||fichier||'"'||' -b -r '||fichier_simulation||' >CON:100/100/500/300/Spice/CLOSE/WAIT/SCREENAmiCAD'
  21.     address command
  22.     'travail:spice3f5/bin/spice3f5full_040' arguments
  23.     /* 'execute' ' Travail:spice3f5/Simuler "'||fichier||'"' */
  24. end
  25.  
  26. exit
  27.  
  28. ParseFileName: procedure
  29.     parse arg FilePath, Part
  30.     DivPos = max(lastpos(':',FilePath),lastpos('/',FilePath))+1
  31.     if abbrev('FILE', upper(Part))
  32.     then return substr(FilePath, DivPos)
  33.     else
  34.     return strip(left(FilePath, DivPos-1),'T','/')
  35.  
  36. /* Traitement des erreurs, interruption du programme */
  37. syntax:
  38. erreur=RC
  39. 'MESSAGE("Erreur de syntaxe"+CHR(10)+"en ligne 'SIGL'"+CHR(10)+"'errortext(erreur)'")'
  40. exit
  41.  
  42. error:
  43. 'MESSAGE("Erreur en ligne 'SIGL'")'
  44. exit
  45.